﻿using System;
using GameEngine.Model;
using GameEngine.Model.Data;
using PureMVC.Interfaces;
using PureMVC.Patterns;

namespace GameEngine.Controller
{
    public class DestroyThingCommand<MyIdType> : SimpleCommand
        where MyIdType : IComparable<MyIdType>
    {
        override public void Execute(INotification notification)
        {
            var thing = notification.Body as IThingVOId<MyIdType>;
            Facade.RemoveProxy(IThingDataProxyConstants<MyIdType>.CreateName(thing));
        }
    }
}
